package com.gsk.europepharma.salesReport.hibernate.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the SP_BO.TB_SP_BO_SR_CARTO_CONTOUR table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="SP_BO.TB_SP_BO_SR_CARTO_CONTOUR"
 */

public abstract class BasetbSpBoSRCartoContour  implements Serializable {

	public static String REF = "tbSpBoSRCartoContour";
	public static String PROP_MAJ_USER = "majUser";
	public static String PROP_DATE_MAJ = "dateMaj";
	public static String PROP_CODE_U_G_A = "codeUGA";
	public static String PROP_NB_UGA = "nbUga";


	// constructors
	public BasetbSpBoSRCartoContour () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BasetbSpBoSRCartoContour (
		java.lang.Integer posX,
		java.lang.Integer posY,
		java.lang.Integer csCommonUga) {

		this.setPosX(posX);
		this.setPosY(posY);
		this.setCsCommonUga(csCommonUga);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key

	private java.lang.Integer posX;

	private java.lang.Integer posY;

	private java.lang.Integer csCommonUga;

	// fields
	private java.lang.String codeUGA;
	private java.lang.Integer nbUga;
	private java.lang.String majUser;
	private java.util.Date dateMaj;



	/**
     * @hibernate.property
     *  column=POS_X
	 * not-null=true
	 */
	public java.lang.Integer getPosX () {
		return this.posX;
	}

	/**
	 * Set the value related to the column: POS_X
	 * @param posX the POS_X value
	 */
	public void setPosX (java.lang.Integer posX) {
		this.posX = posX;
		this.hashCode = Integer.MIN_VALUE;
	}

	/**
     * @hibernate.property
     *  column=POS_Y
	 * not-null=true
	 */
	public java.lang.Integer getPosY () {
		return this.posY;
	}

	/**
	 * Set the value related to the column: POS_Y
	 * @param posY the POS_Y value
	 */
	public void setPosY (java.lang.Integer posY) {
		this.posY = posY;
		this.hashCode = Integer.MIN_VALUE;
	}

	/**
     * @hibernate.property
     *  column=CS_COMMON_UGA
	 * not-null=true
	 */
	public java.lang.Integer getCsCommonUga () {
		return this.csCommonUga;
	}

	/**
	 * Set the value related to the column: CS_COMMON_UGA
	 * @param csCommonUga the CS_COMMON_UGA value
	 */
	public void setCsCommonUga (java.lang.Integer csCommonUga) {
		this.csCommonUga = csCommonUga;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: CODE_UGA
	 */
	public java.lang.String getCodeUGA () {
		return codeUGA;
	}

	/**
	 * Set the value related to the column: CODE_UGA
	 * @param codeUGA the CODE_UGA value
	 */
	public void setCodeUGA (java.lang.String codeUGA) {
		this.codeUGA = codeUGA;
	}



	/**
	 * Return the value associated with the column: NB_UGA
	 */
	public java.lang.Integer getNbUga () {
		return nbUga;
	}

	/**
	 * Set the value related to the column: NB_UGA
	 * @param nbUga the NB_UGA value
	 */
	public void setNbUga (java.lang.Integer nbUga) {
		this.nbUga = nbUga;
	}



	/**
	 * Return the value associated with the column: MAJ_USER
	 */
	public java.lang.String getMajUser () {
		return majUser;
	}

	/**
	 * Set the value related to the column: MAJ_USER
	 * @param majUser the MAJ_USER value
	 */
	public void setMajUser (java.lang.String majUser) {
		this.majUser = majUser;
	}



	/**
	 * Return the value associated with the column: D_MAJ
	 */
	public java.util.Date getDateMaj () {
		return dateMaj;
	}

	/**
	 * Set the value related to the column: D_MAJ
	 * @param dateMaj the D_MAJ value
	 */
	public void setDateMaj (java.util.Date dateMaj) {
		this.dateMaj = dateMaj;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.gsk.europepharma.salesReport.hibernate.tbSpBoSRCartoContour)) return false;
		else {
			com.gsk.europepharma.salesReport.hibernate.tbSpBoSRCartoContour tbSpBoSRCartoContour = (com.gsk.europepharma.salesReport.hibernate.tbSpBoSRCartoContour) obj;
			if (null != this.getPosX() && null != tbSpBoSRCartoContour.getPosX()) {
				if (!this.getPosX().equals(tbSpBoSRCartoContour.getPosX())) {
					return false;
				}
			}
			else {
				return false;
			}
			if (null != this.getPosY() && null != tbSpBoSRCartoContour.getPosY()) {
				if (!this.getPosY().equals(tbSpBoSRCartoContour.getPosY())) {
					return false;
				}
			}
			else {
				return false;
			}
			if (null != this.getCsCommonUga() && null != tbSpBoSRCartoContour.getCsCommonUga()) {
				if (!this.getCsCommonUga().equals(tbSpBoSRCartoContour.getCsCommonUga())) {
					return false;
				}
			}
			else {
				return false;
			}
			return true;
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			StringBuilder sb = new StringBuilder();
			if (null != this.getPosX()) {
				sb.append(this.getPosX().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			if (null != this.getPosY()) {
				sb.append(this.getPosY().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			if (null != this.getCsCommonUga()) {
				sb.append(this.getCsCommonUga().hashCode());
				sb.append(":");
			}
			else {
				return super.hashCode();
			}
			this.hashCode = sb.toString().hashCode();
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}